<?php


namespace app\controllers;


use app\models\request\ReqCreateOrder;
use app\models\request\ReqLogistics;
use app\models\UserDto;
use app\service\GoodsService;
use app\service\ApplyService;

class LogisticsController extends BaseJsonController
{
    /**
     * @param $req ReqLogistics
     * @param $userInfo UserDto
     * @return mixed|void
     */
    public function doService($req, $userInfo)
    {
        $req->setUserId($userInfo->getUserId());
        $service = new ApplyService();
        return $service->getLogistics($req);
    }

    /**
     * @return ReqLogistics
     */
    protected function injectionReq()
    {
        return new ReqLogistics();
    }

    /**
     * @return bool
     */
    public function needLogin(){
        return true;
    }

}